package com.sixth.volunteerservicesystem.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import java.sql.Time;
import java.util.Date;

@Controller
public class IndexController {

    @RequestMapping("/")
    public String index(Model m, HttpServletRequest request) {
        System.out.println("This is my first soring boot");
        long millis = System.currentTimeMillis();
        System.out.println(millis);
        String stat = (String) request.getSession().getAttribute("stat");
        m.addAttribute("stat", stat);
        return "index";
    }
}
